Skip to content

NavMeshSurface - support for tree colliders#101

Open
OndrejPetrzilka wants to merge 4 commits into
Unity-Technologies:masterfrom
OndrejPetrzilka:TreeColliders
Open

NavMeshSurface - support for tree colliders#101
OndrejPetrzilka wants to merge 4 commits into
Unity-Technologies:masterfrom
OndrejPetrzilka:TreeColliders

Conversation

@OndrejPetrzilka

@OndrejPetrzilka OndrejPetrzilka commented Oct 31, 2018

Copy link
Copy Markdown

After sources are collected by calling NavMeshBuilder.CollectSources, go through and add tree colliders for each TerrainCollider encountered.

Supported tree colliders are: Sphere, Capsule, Box, Mesh.

Tree colliders are added with hard-coded area Non-walkable.
NavMeshModifier on trees is not supported (yet).
NavMeshModifierVolume should work as usual, even on trees.

In future I'd like to support NavMeshModifier and use default area instead of hard-coded Non-walkable

Resolves #30

@OndrejPetrzilka OndrejPetrzilka changed the title Add tree colliders for each processed TerrainCollider NavMeshSurface - support for tree colliders Oct 31, 2018
@OndrejPetrzilka

Copy link
Copy Markdown
Author

There was missing TryCast extension method, fixed

@hendriku

Copy link
Copy Markdown

@turadr Could we please have a review on this? Would be so awesome to have this available in the NavMeshComponents. Thank you! :))

@turadr

turadr commented Jan 11, 2021

Copy link
Copy Markdown
Collaborator

@hendriku We appreciate the work put into this PR but unfortunately we cannot take contributions to this repository right now. If that will become possible in the future we will then address this PR.

@kkolyan

kkolyan commented Dec 3, 2022

Copy link
Copy Markdown

thanks, that's useful!

SphereCollider sphere;
CapsuleCollider capsule;
MeshCollider mesh;
if (collider.TryCast(out sphere))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (collider is SphereCollider sphere), etc

@Alifaruq18

Copy link
Copy Markdown

Hi what is the NavMechComponents URL for Unity cus when i go in unity to my Package Manager the URL from NavMechComponents doesnt work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants